/**
 * 默认基础组设备开关-开启
 * @param equiId
 */
function doStart4BasicGrp(equiId) {
    if (typeof(equiId) == "undefined"){
        equiId = curEquipId;
    }
    doStartup(equiId,curBasicGrpId)
}

/**
 * 通用设备开关-开启(包括系统组与基础组)
 * equiId == undefined 时采用 curEquipId
 * groupId == undefined 时采用 curSysGrpId
 * @param equiId
 * @param groupId
 */
function doStartup(equiId,groupId){
    var stationCode,groupId;
    stationCode = curStationCode;
    if (typeof(equiId) == "undefined"){
        equiId = curEquipId;
    }
    if (typeof(groupId) == "undefined"){
        groupId = curSysGrpId;
    }
    if(stationCode != "" && groupId != "" && equiId != ""){
        bootbox.confirm("确认要执行开机操作吗?", function (result) {
            if (result) {
                onAjaxAction(ctx+"/biz/basic/sendcmd","stationCode="+stationCode+"&groupId="+groupId+"&device="+equiId+"&cmd=startup");
            }
        });
    }else{
        Messenger().post("操作失败,参数不完整!");
    }
}

/**
 * 通用设备开关-关闭(包插系统组与基础组)
 * equiId == undefined 时采用 curEquipId
 * groupId == undefined 时采用 curSysGrpId
 * @param equiId
 * @param groupId
 */
function doShutdown(equiId,groupId){
    var stationCode,groupId;
    stationCode = curStationCode;
    if (typeof(equiId) == "undefined"){
        equiId = curEquipId;
    }
    if (typeof(groupId) == "undefined"){
        groupId = curSysGrpId;
    }
    groupId = curSysGrpId;
    if(stationCode != "" && groupId != "" && equiId != ""){
        bootbox.confirm("确认要执行关机操作吗?", function (result) {
            if (result) {
                onAjaxAction(ctx+"/biz/basic/sendcmd","stationCode="+stationCode+"&groupId="+groupId+"&device="+equiId+"&cmd=shutdown");
            }
        });
    }else{
        Messenger().post("操作失败,参数不完整!");
    }
}

<!--激励器电平值设置-->
function updatePram(pramName, unit) {
    bootbox.prompt({
        size: 'small',
        title: "参数设置-" + pramName + "(单位:" + unit + ")",
        callback: function (result) {
            if (result !== null) {
                Messenger().post("该功能尚未开启!");
            }
        }
    });
}

function onAjaxAction(url, data) {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: url,
        data: data,
        success: function (msg) {
            if (msg == "1") {
                Messenger().post("操作指令已发送!");
            } else {
                Messenger().post("操作失败!");
            }
        }
    })
}